﻿using System;
using System.Linq;
using WCFHostingModel;

namespace WCFHostingServiceLibrary
{
    public class UserService : IUserService
    {
        public UserModel GetUserModel(string uid)
        {
            if (string.IsNullOrWhiteSpace(uid)) throw new ArgumentNullException(nameof(uid));
            var data = TestData.Users;
            return data?.FirstOrDefault(x => x.Uid == uid);
        }
    }
}